3.163 \(\int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=85 \[ -\frac {2 \sin ^7(c+d x)}{7 a^2 d}+\frac {\sin ^5(c+d x)}{a^2 d}-\frac {4 \sin ^3(c+d x)}{3 a^2 d}+\frac {\sin (c+d x)}{a^2 d}+\frac {2 i \cos ^7(c+d x)}{7 a^2 d} \]

[Out]

2/7*I*cos(d*x+c)^7/a^2/d+sin(d*x+c)/a^2/d-4/3*sin(d*x+c)^3/a^2/d+sin(d*x+c)^5/a^2/d-2/7*sin(d*x+c)^7/a^2/d

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3092, 3090, 2633, 2565, 30, 2564, 270} \[ -\frac {2 \sin ^7(c+d x)}{7 a^2 d}+\frac {\sin ^5(c+d x)}{a^2 d}-\frac {4 \sin ^3(c+d x)}{3 a^2 d}+\frac {\sin (c+d x)}{a^2 d}+\frac {2 i \cos ^7(c+d x)}{7 a^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^2,x]

[Out]

(((2*I)/7)*Cos[c + d*x]^7)/(a^2*d) + Sin[c + d*x]/(a^2*d) - (4*Sin[c + d*x]^3)/(3*a^2*d) + Sin[c + d*x]^5/(a^2
*d) - (2*Sin[c + d*x]^7)/(7*a^2*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx &=-\frac {\int \cos ^5(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^2 \, dx}{a^4}\\ &=-\frac {\int \left (-a^2 \cos ^7(c+d x)+2 i a^2 \cos ^6(c+d x) \sin (c+d x)+a^2 \cos ^5(c+d x) \sin ^2(c+d x)\right ) \, dx}{a^4}\\ &=-\frac {(2 i) \int \cos ^6(c+d x) \sin (c+d x) \, dx}{a^2}+\frac {\int \cos ^7(c+d x) \, dx}{a^2}-\frac {\int \cos ^5(c+d x) \sin ^2(c+d x) \, dx}{a^2}\\ &=\frac {(2 i) \operatorname {Subst}\left (\int x^6 \, dx,x,\cos (c+d x)\right )}{a^2 d}-\frac {\operatorname {Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{a^2 d}-\frac {\operatorname {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{a^2 d}\\ &=\frac {2 i \cos ^7(c+d x)}{7 a^2 d}+\frac {\sin (c+d x)}{a^2 d}-\frac {\sin ^3(c+d x)}{a^2 d}+\frac {3 \sin ^5(c+d x)}{5 a^2 d}-\frac {\sin ^7(c+d x)}{7 a^2 d}-\frac {\operatorname {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{a^2 d}\\ &=\frac {2 i \cos ^7(c+d x)}{7 a^2 d}+\frac {\sin (c+d x)}{a^2 d}-\frac {4 \sin ^3(c+d x)}{3 a^2 d}+\frac {\sin ^5(c+d x)}{a^2 d}-\frac {2 \sin ^7(c+d x)}{7 a^2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.11, size = 149, normalized size = 1.75 \[ \frac {15 \sin (c+d x)}{32 a^2 d}+\frac {11 \sin (3 (c+d x))}{96 a^2 d}+\frac {\sin (5 (c+d x))}{32 a^2 d}+\frac {\sin (7 (c+d x))}{224 a^2 d}+\frac {5 i \cos (c+d x)}{32 a^2 d}+\frac {3 i \cos (3 (c+d x))}{32 a^2 d}+\frac {i \cos (5 (c+d x))}{32 a^2 d}+\frac {i \cos (7 (c+d x))}{224 a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^2,x]

[Out]

(((5*I)/32)*Cos[c + d*x])/(a^2*d) + (((3*I)/32)*Cos[3*(c + d*x)])/(a^2*d) + ((I/32)*Cos[5*(c + d*x)])/(a^2*d)
+ ((I/224)*Cos[7*(c + d*x)])/(a^2*d) + (15*Sin[c + d*x])/(32*a^2*d) + (11*Sin[3*(c + d*x)])/(96*a^2*d) + Sin[5
*(c + d*x)]/(32*a^2*d) + Sin[7*(c + d*x)]/(224*a^2*d)

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 74, normalized size = 0.87 \[ \frac {{\left (-7 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 105 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 21 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{672 \, a^{2} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/672*(-7*I*e^(10*I*d*x + 10*I*c) - 105*I*e^(8*I*d*x + 8*I*c) + 210*I*e^(6*I*d*x + 6*I*c) + 70*I*e^(4*I*d*x +
4*I*c) + 21*I*e^(2*I*d*x + 2*I*c) + 3*I)*e^(-7*I*d*x - 7*I*c)/(a^2*d)

________________________________________________________________________________________

giac [A]  time = 1.20, size = 145, normalized size = 1.71 \[ \frac {\frac {7 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 8\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right )}^{3}} + \frac {273 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1155 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 2450 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2870 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2037 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 791 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 152}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}^{7}}}{168 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/168*(7*(9*tan(1/2*d*x + 1/2*c)^2 + 15*I*tan(1/2*d*x + 1/2*c) - 8)/(a^2*(tan(1/2*d*x + 1/2*c) + I)^3) + (273*
tan(1/2*d*x + 1/2*c)^6 - 1155*I*tan(1/2*d*x + 1/2*c)^5 - 2450*tan(1/2*d*x + 1/2*c)^4 + 2870*I*tan(1/2*d*x + 1/
2*c)^3 + 2037*tan(1/2*d*x + 1/2*c)^2 - 791*I*tan(1/2*d*x + 1/2*c) - 152)/(a^2*(tan(1/2*d*x + 1/2*c) - I)^7))/d

________________________________________________________________________________________

maple [B]  time = 0.19, size = 174, normalized size = 2.05 \[ \frac {-\frac {i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{3}}+\frac {3}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {2 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{6}}-\frac {5 i}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{4}}+\frac {23 i}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{2}}-\frac {4}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{7}}+\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{5}}-\frac {55}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )^{3}}+\frac {13}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-i\right )}}{d \,a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x)

[Out]

2/d/a^2*(-1/16*I/(tan(1/2*d*x+1/2*c)+I)^2-1/24/(tan(1/2*d*x+1/2*c)+I)^3+3/16/(tan(1/2*d*x+1/2*c)+I)+I/(tan(1/2
*d*x+1/2*c)-I)^6-5/2*I/(tan(1/2*d*x+1/2*c)-I)^4+23/16*I/(tan(1/2*d*x+1/2*c)-I)^2-2/7/(tan(1/2*d*x+1/2*c)-I)^7+
2/(tan(1/2*d*x+1/2*c)-I)^5-55/24/(tan(1/2*d*x+1/2*c)-I)^3+13/16/(tan(1/2*d*x+1/2*c)-I))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 4.11, size = 161, normalized size = 1.89 \[ \frac {\left (-21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,42{}\mathrm {i}+28\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,56{}\mathrm {i}+42\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,28{}\mathrm {i}+76\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,24{}\mathrm {i}+3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-6{}\mathrm {i}\right )\,2{}\mathrm {i}}{21\,a^2\,d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )}^3\,{\left (1+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}\right )}^7} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^5/(a*cos(c + d*x) + a*sin(c + d*x)*1i)^2,x)

[Out]

((3*tan(c/2 + (d*x)/2) - tan(c/2 + (d*x)/2)^2*24i + 76*tan(c/2 + (d*x)/2)^3 + tan(c/2 + (d*x)/2)^4*28i + 42*ta
n(c/2 + (d*x)/2)^5 + tan(c/2 + (d*x)/2)^6*56i + 28*tan(c/2 + (d*x)/2)^7 + tan(c/2 + (d*x)/2)^8*42i - 21*tan(c/
2 + (d*x)/2)^9 - 6i)*2i)/(21*a^2*d*(tan(c/2 + (d*x)/2) + 1i)^3*(tan(c/2 + (d*x)/2)*1i + 1)^7)

________________________________________________________________________________________

sympy [A]  time = 0.59, size = 233, normalized size = 2.74 \[ \begin {cases} \frac {\left (- 176160768 i a^{10} d^{5} e^{19 i c} e^{3 i d x} - 2642411520 i a^{10} d^{5} e^{17 i c} e^{i d x} + 5284823040 i a^{10} d^{5} e^{15 i c} e^{- i d x} + 1761607680 i a^{10} d^{5} e^{13 i c} e^{- 3 i d x} + 528482304 i a^{10} d^{5} e^{11 i c} e^{- 5 i d x} + 75497472 i a^{10} d^{5} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{16911433728 a^{12} d^{6}} & \text {for}\: 16911433728 a^{12} d^{6} e^{16 i c} \neq 0 \\\frac {x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 7 i c}}{32 a^{2}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5/(a*cos(d*x+c)+I*a*sin(d*x+c))**2,x)

[Out]

Piecewise(((-176160768*I*a**10*d**5*exp(19*I*c)*exp(3*I*d*x) - 2642411520*I*a**10*d**5*exp(17*I*c)*exp(I*d*x)
+ 5284823040*I*a**10*d**5*exp(15*I*c)*exp(-I*d*x) + 1761607680*I*a**10*d**5*exp(13*I*c)*exp(-3*I*d*x) + 528482
304*I*a**10*d**5*exp(11*I*c)*exp(-5*I*d*x) + 75497472*I*a**10*d**5*exp(9*I*c)*exp(-7*I*d*x))*exp(-16*I*c)/(169
11433728*a**12*d**6), Ne(16911433728*a**12*d**6*exp(16*I*c), 0)), (x*(exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I*
c) + 10*exp(4*I*c) + 5*exp(2*I*c) + 1)*exp(-7*I*c)/(32*a**2), True))

________________________________________________________________________________________